local frames = 0
local tick

function countFPS()
	-- Get tick count of the second
	if not tick then
		tick = getTickCount()
	end
	
	-- Increase frames count
	frames = frames + 1
	
	if getTickCount() - tick >= 1000 then
		-- Set FPS count
		localPlayer:Data("FPS", frames)
		
		-- Reset values
		frames = 0
		tick = false
	end
end

onClientRender:Handle(countFPS)